﻿<%@ page import="cn.tydy.pojo.User" %>
<%@ page import="java.util.List" %>
<%@ page import="cn.tydy.pojo.User" %>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>超市订单管理系统</title>
    <link type="text/css" rel="stylesheet" href="static/css/style.css" />
    <link type="text/css" rel="stylesheet" href="static/css/public.css" />
</head>
<body>
<!--头部-->
<jsp:include page="frame.jsp"></jsp:include>
 <!--主体内容-->
 <section class="publicMian ">
	 <jsp:include page="left.jsp"></jsp:include>
        <div class="right">
            <div class="location">
                <strong>你现在所在的位置是:</strong>
                <span>用户管理页面</span>
            </div>
            <div class="search">
           		<form method="get" action="jsp/user.do">
					<input name="method" value="query" class="input-text" type="hidden">
					 <span>用户名：</span>
					 <input name="queryname" class="input-text"	type="text" value="">
					 
					 <span>用户角色：</span>
					 <select name="queryUserRole">
						
						   <option value="0">--请选择--</option>
						   
						   		<option 
						   		value="1">系统管理员</option>
						   
						   		<option 
						   		value="2">经理</option>
						   
						   		<option 
						   		value="3">普通员工</option>
						   
						
	        		</select>
					 
					 <input type="hidden" name="pageIndex" value="1"/>
					 <input	value="查 询" type="submit" id="searchbutton">
					 <a href="/user/addUser.html" >添加用户</a>
				</form>
            </div>
            <!--用户-->
            <table class="providerTable" cellpadding="0" cellspacing="0">
                <tr class="firstTr">
                    <th width="10%">用户编码</th>
                    <th width="20%">用户名称</th>
                    <th width="10%">性别</th>
                    <th width="10%">年龄</th>
                    <th width="10%">电话</th>
                    <th width="10%">用户角色</th>
                    <th width="30%">操作</th>
                </tr>

				<%
					if (request.getAttribute("users")!=null){
						List<User> users= (List<User>) request.getAttribute("users");
						for (User u:users) {
				%>
				<tr>
					<td>
						<span><%=u.getUserCode()%></span>
					</td>
					<td>
						<span><%=u.getUserName()%></span>
					</td>
					<td>
							<span>

								<%=u.getGender()%>
							</span>
					</td>
					<td>
						<span><%=u.getBirthday()%></span>
					</td>
					<td>
						<span><%=u.getPhone()%></span>
					</td>
					<td>
						<span><%=u.getUserRole()%></span>
					</td>
					<td>
						<span><a class="viewUser" href="javascript:;" userid=<%=u.getId()%> username=孙兴><img src="static/images/read.png" alt="查看" title="查看"/></a></span>
						<span><a class="modifyUser" href="/user/userModify.do/<%=u.getId()%> " userid=11 username=孙兴><img src="static/images/xiugai.png" alt="修改" title="修改"/></a></span>
						<span><a class="deleteUser" href="/user/userdel.do/<%=u.getId()%> " ><img src="static/images/schu.png" alt="删除" title="删除"/></a></span>
					</td>
				</tr>

				<%
						}
					}
				%>
				
			</table>
			<input type="hidden" id="totalPageCount" value="3"/>
		  	
	          	
	          	
	          	
          	

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	
</script>
</head>
<%--<body>
 		<div class="page-bar">
			<ul class="page-num-ul clearfix">
				<li>共12条记录&nbsp;&nbsp; 1/3页</li>
				
				
					<a href="javascript:page_nav(document.forms[0],2);">下一页</a>
					<a href="javascript:page_nav(document.forms[0],3);">最后一页</a>
				
				&nbsp;&nbsp;
			</ul>
		 <span class="page-go-form"><label>跳转至</label>
	     <input type="text" name="inputPage" id="inputPage" class="page-key" />页
	     <button type="button" class="page-btn" onClick='jump_to(document.forms[0],document.getElementById("inputPage").value)'>GO</button>
		</span>
		</div> 
</body>--%>
<script type="text/javascript" src="static/js/rollpage.js"></script>
</html>
        </div>
    </section>

<!--点击删除按钮后弹出的页面-->
<div class="zhezhao"></div>
<div class="remove" id="removeUse">
    <div class="removerChid">
        <h2>提示</h2>
        <div class="removeMain">
            <p>你确定要删除该用户吗？</p>
            <a href="#" id="yes">确定</a>
            <a href="#" id="no">取消</a>
        </div>
    </div>
</div>



<footer class="footer">
    版权归北大青鸟
</footer>
<script type="text/javascript" src="static/js/time.js"></script>
<script type="text/javascript" src="static/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="static/js/common.js"></script>
<script type="text/javascript" src="static/calendar/WdatePicker.js"></script>
</body>
</html>
<script type="text/javascript" src="static/js/userlist.js"></script>
